home *** CD-ROM | disk | FTP | other *** search
- /*
- File: GDeviceWindow.h
-
- Contains: A window that displays information about a GDevice
-
- Written by: Kent Miller
-
- Copyright: © 1995 Apple Computer
-
- Change History (most recent first):
-
- */
-
- #ifndef _GDEVICEWINDOW_
- #define _GDEVICEWINDOW_
-
- #ifndef _WINDOW_
- #include "Window.h"
- #endif
-
- #ifndef _DISPLAYS_
- #include <Displays.h>
- #endif
-
- #ifndef _PALETTES_
- #include <Palettes.h>
- #endif
-
- #define Max(x,y) (x > y) ? x:y;
- #define Min(x,y) (x < y) ? x:y;
-
- class TGDeviceWindow : public TWindow
- {
- protected:
- public:
- TGDeviceWindow();
- virtual ~TGDeviceWindow();
-
- //Overridden methods
- virtual WindowPtr MakeNewWindow(WindowPtr behindWindow);
- virtual void Draw(void);
- virtual void Click(EventRecord * anEvent);
- virtual void Activate(Boolean activating);
-
- virtual void Drag(Point startPoint);
- virtual void AdjustMenusBeforeMenuSelection(void);
-
- //New Methods
- virtual OSErr SetUpData(GDHandle theGD);
- virtual void WindowOnDevice(void);
-
- protected:
- //variables
- DisplayIDType theID; //Even though GDHandles might change, the Display Manager
- //ID will always remain the same. If this window is on
- //a mirrored device, this will be the ID of the first device
- //that had the mirrored space when the window was created.
-
- };
-
- pascal void GDeviceWindowDrawingProc ( SInt16 depth,
- SInt16 deviceFlags,
- GDHandle targetDevice,
- SInt32 userData);
-
- void DrawThisCStringHere(unsigned char * s, SInt16 h, SInt16 v);
- void DrawARamp(SInt16 depth, Rect * rampRect );
- void SetRampRGBColor(RGBColor * theRGB, SInt16 value, SInt16 rampColor);
- void DrawMiniMonitors(Rect *drawHere, GDHandle thisGDevice);
-
- #endif
-